import httpInstance from "@/utils/http.js";

/**
 * 获取轮播图数据
 * @param params 轮播图类型
 * @returns {*}
 */
export function getBannerAPI(params = {}) {
    const {distributionSite = '1'} = params; // 默认为1
    return httpInstance({
        url: '/home/banner',
        method: "GET",
        params: {
            distributionSite
        }
    })
}

/**
 * 获取新鲜好物数据
 * @returns {*}
 */
export function findNewAPI() {
    return httpInstance({
        url: '/home/new',
        method: "GET"
    })
}

/**
 * 获取人气推荐数据
 * @returns {*}
 */
export function getHotAPI() {
    return httpInstance({
        url: '/home/hot',
        method: "GET"
    })
}

/**
 * 获取所有商品模块
 * @returns {*}
 */
export function getGoodsAPI() {
    return httpInstance({
        url: '/home/goods',
        method: 'GET'
    })
}
